﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WBIform
{
    public partial class login : Form
    {
        public int dem=0;
        public login()
        {
            InitializeComponent();
        }

        private void btnsubmit_Click(object sender, EventArgs e)
        {
            String login = "baitap";
            String pass = "baitap";

            if (txtlogin.Text == login && txtpass.Text == pass)
                this.Close();
            else
            {
                MessageBox.Show("User name or password is error!!!", "Infomation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                dem++;
                lblcount.Text = "Số lần đăng nhập: " + dem;
                if (dem == 3)
                    Application.Exit();
            }
        }

        private void btnclose_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

       
    }
}
